package org.wxd.mis.reg;

import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wangxd on 2017/4/12.
 */

//@RunWith(SpringJUnit4ClassRunner.class)
//@SpringBootTest(classes = Application.class)
//@WebAppConfiguration
//@RestController
public class Application {

    Logger logger = LoggerFactory.getLogger(Application.class);

    public static class Param{
        String text;

        public void setText(String text) {
            this.text = text;
        }
    }
    public static class RequestParam{
        String name;
        Param param;

        public void setParam(Param param) {
            this.param = param;
        }

        public void setName(String name) {
            this.name = name;
        }
    }
    @RequestMapping(name = "HelloService", method = RequestMethod.GET, path = "/hello")
    public String hello(RequestParam requestParam) {
        logger.debug("debug=======");
        logger.trace("trace=======");
        logger.info("info=======");
        logger.warn("warn=======");
        logger.error("error=======");
        return "hello";
    }
}
